﻿using SQLite;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Controls;
using ymk_camera_surveillance.Config;
using ymk_camera_surveillance.Database.DBModels;

namespace ymk_camera_surveillance.Database
{
    public static class DbInstance
    {
        public static SQLiteConnection GetConn()
        {
            var databasePath = Conf.Instance.DatabasePath;

            var db = new SQLiteConnection(databasePath);
            // create table
            db.CreateTable<DBCamera>();
            db.CreateTable<DBConf>();

            return db;
        }
    }
}
